package ua.com.m1995.client;

public class DBFStructureAdapterAC001 extends DBFStructureAdapter {

	/**
	 * Adapter's signature.
	 */
	private static final String[] ARRAY_OF_COLUMNS = {		
		"NAME:N3; TYPE:N; OFFSET:1; LENGTH:12; DECIMAL:0;",
		"NAME:NAZ; TYPE:C; OFFSET:13; LENGTH:3; DECIMAL:0;",
		"NAME:OB; TYPE:C; OFFSET:16; LENGTH:8; DECIMAL:0;",
		"NAME:KOMN; TYPE:C; OFFSET:24; LENGTH:1; DECIMAL:0;",
		"NAME:PLANIR; TYPE:C; OFFSET:25; LENGTH:2; DECIMAL:0;",
		"NAME:RASPOL; TYPE:C; OFFSET:27; LENGTH:21; DECIMAL:0;",
		"NAME:MASIV; TYPE:C; OFFSET:48; LENGTH:25; DECIMAL:0;",
		"NAME:STREET; TYPE:C; OFFSET:73; LENGTH:30; DECIMAL:0;",
		"NAME:DOM_N; TYPE:C; OFFSET:103; LENGTH:7; DECIMAL:0;",
		"NAME:CENA; TYPE:N; OFFSET:110; LENGTH:9; DECIMAL:0;",
		"NAME:DATS; TYPE:D; OFFSET:119; LENGTH:8; DECIMAL:0;",
		"NAME:PL_O; TYPE:N; OFFSET:127; LENGTH:7; DECIMAL:0;",
		"NAME:PL_J; TYPE:N; OFFSET:134; LENGTH:7; DECIMAL:0;",
		"NAME:ZEM; TYPE:N; OFFSET:141; LENGTH:7; DECIMAL:1;",
		"NAME:ETAJ; TYPE:N; OFFSET:148; LENGTH:2; DECIMAL:0;",
		"NAME:ETAJA; TYPE:N; OFFSET:150; LENGTH:2; DECIMAL:0;",
		"NAME:DOM; TYPE:C; OFFSET:152; LENGTH:2; DECIMAL:0;",
		"NAME:T; TYPE:C; OFFSET:154; LENGTH:3; DECIMAL:0;",
		"NAME:SOST; TYPE:C; OFFSET:157; LENGTH:4; DECIMAL:0;",
		"NAME:MEB; TYPE:C; OFFSET:161; LENGTH:4; DECIMAL:0;",
		"NAME:BEZOP; TYPE:C; OFFSET:165; LENGTH:4; DECIMAL:0;",
		"NAME:SA; TYPE:C; OFFSET:169; LENGTH:4; DECIMAL:0;",
		"NAME:FO; TYPE:C; OFFSET:173; LENGTH:4; DECIMAL:0;",
		"NAME:INFORMATIO; TYPE:C; OFFSET:177; LENGTH:80; DECIMAL:0;",
		"NAME:N1; TYPE:N; OFFSET:257; LENGTH:8; DECIMAL:0;",
		"NAME:N2; TYPE:N; OFFSET:265; LENGTH:8; DECIMAL:0;",
		"NAME:TELEFON; TYPE:N; OFFSET:273; LENGTH:7; DECIMAL:0;",
		"NAME:FIRMA; TYPE:C; OFFSET:280; LENGTH:20; DECIMAL:0;",
		"NAME:EX; TYPE:C; OFFSET:300; LENGTH:1; DECIMAL:0;",
		"NAME:S; TYPE:L; OFFSET:301; LENGTH:1; DECIMAL:0;",
		"NAME:KOD; TYPE:N; OFFSET:302; LENGTH:4; DECIMAL:0;"
	};
	
	public String[] getArrayOfColumns() {
		return ARRAY_OF_COLUMNS;
	}
	
	public RealEstateObjectList readData(byte[] bytes) throws ProgramException {
		RealEstateObjectList list = new RealEstateObjectList();
		DBFStructureRowReader reader = new DBFStructureRowReaderAC001();
		reader.read(bytes, list, this);
		return list;
	}

}
